home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: ncrgw2.ncr.com!ncrhub6!daynews!ranger!news
- From: Eric Laroche <elaroche@smtpadc.switzerland.attgis.com>
- Subject: Re: How to make this code portable?
- X-Nntp-Posting-Host: 135.135.180.223
- Content-Type: text/plain; charset=us-ascii
- Message-ID: <DnsvuG.66n@ranger.daytonoh.attgis.com>
- Sender: news@ranger.daytonoh.attgis.com (News Administrative Login)
- Content-Transfer-Encoding: 7bit
- Organization: AT&T Global Information Solutions
- References: <4h8k9j$78r@habs.ee.ubc.ca> <4hag3v$5or@nntp.ucs.ubc.ca>
- Mime-Version: 1.0
- Date: Tue, 5 Mar 1996 15:18:16 GMT
- X-Mailer: Mozilla 1.2N (Windows; I; 16bit)
-
- Jennifer Gee <jgee@unixg.ubc.ca> wrote:
- >
- >>However, on the PC, "*.txt" is passed into my program as
- >>command line argument as is. This means that I may have to
- >>put in extra operating system dependent logic to expand the wildcard
- >>inside my program.
- >
- >>Ellen Ho
- >>ellenh@ee.ubc.ca
- >
- >You will have to use conditional compilation if you want to make this
- >portable, as you will have to write additional code(system("blah");) to
- >handle this problem. That is the comp.lang.c answer anyways.
-
- It's not a good idea to include calls to system() to handle the filename
- expansion. Most compiler providers include functions to support that.
-
- Some compilers may even provide support for this on the link level (by
- explicitely linking an objext setargv.obj or the like), i.e. not even
- conditional compiles are needed.
-
- --Eric
-
- ----
- Eric Laroche -- elaroche@smtpadc.switzerland.attgis.com, laroche@access.ch
-
-
-